home *** CD-ROM | disk | FTP | other *** search
/ Young Minds / Young Minds Interactive CD-ROM.ISO / crystal / cvlocs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-01-12  |  2.3 KB  |  80 lines

  1. /* cvlocs.h
  2.  *    include file for adventure locations
  3.  *********************************************************************/
  4.  
  5. #define    DUNGEON    81
  6.  
  7. struct rtr {
  8.     int top,mid,bot,drop,rug;};
  9. extern struct rtr rtrav[];
  10.  
  11. struct hint {
  12.     int turns,points,quest,hmsg,bit,lc,hinted;};
  13.  
  14. extern struct hint hints[] ;
  15.  
  16. #define    IF_HAVE    1
  17. #define    IF_NHAVE    2
  18. #define    IF_WITH    3
  19. #define    IF_NWITH    4
  20. #define    IF_PROP    5
  21. #define    IF_NPROP    6
  22.  
  23. struct cvtrav {
  24.     int word;
  25.     unsigned int l:10;    /* location / message */
  26.     unsigned int n:8;    /* probability / object */
  27.     unsigned int v:4;    /* prop # / flag */
  28.     unsigned int m:3;    /* type */
  29.     unsigned int s:1;    /* continue flag */
  30.     };
  31.  
  32. struct cvloc {
  33.     long flags;
  34.     struct cvtrav *travel;
  35.     char *sdesc, *ldesc;
  36.     int abb;
  37.     struct conn atloc;
  38.     };
  39.  
  40. extern struct cvloc *loc ;
  41. #define    BOATPLC    (&(cvloc[32]))
  42. extern struct cvloc cvloc[] ;
  43. extern struct cvloc *newloc, *oldloc, *knfloc, *oldlc2;
  44. extern int tally, tally2 ;
  45.  
  46.  
  47. #define    LAMPLOC    (&(cvloc[2]))
  48. #define    SEARSL    (&(cvloc[78]))
  49. #define    CHLOC    (&(cvloc[87]))
  50. #define    DALTLC    (&(cvloc[84]))
  51. #define OFFICE    (&(cvloc[149]))
  52. #define    REPOS    (&(cvloc[150]))
  53. #define    DEAD    LOST
  54.  
  55. #define    FORCED(lpt)    ((lpt)->flags == C_FORCED)
  56. #define    LIQLOC(lpt)    (((lpt)->flags & C_WINE) \
  57.                 ? (((lpt)->flags & C_WINE) == C_WINE ? _WINE : _WATER) : 0 )
  58. #define    DARKRM    (((loc->flags & LIGHT) == 0) \
  59.                 && ((LAMP->prop == 0) || !HERE(LAMP)))
  60. #define    DARK    (DARKRM && ((UNICRN->prop == 0) || !HERE(UNICRN)))
  61. #define BADPLC(lpt)    ((lpt)->flags & ESCAPE)
  62. #define    LNUM(lpt)    ((lpt) - cvloc)
  63. #define    INMAZE(lpt)    ((lpt)->flags & (HINT3 | HINT4))
  64.  
  65. #define    LIGHT    1        /* light here always */
  66. #define    LIQUID    4        /* there's something liquid here */
  67. #define    C_WATER    LIQUID        /* it's water */
  68. #define    C_WINE    (LIQUID+2)    /* it's wine */
  69. #define    C_FORCED    2        /* special: loc with forced motion */
  70. #define    ESCAPE    8        /* you can avoid some dwarves here */
  71. #define    HINT1    16        /* trying to find the cave? */
  72. #define    HINT2    32        /* trying to find the real adventure? */
  73. #define    HINT3    64        /* lost in time maze */
  74. #define    HINT4    128        /* trying to get back to time maze */
  75. #define    HINT5    256        /* trying to get out of the woods? */
  76. #define HINT6    512        /* trying to get down the hole */
  77. #define    SECRET    1024        /* secret passage here */
  78. #define    RANGER    2048        /* ranger rick annoys you here */
  79. #define    DROWN    4096        /* don't drop boat or carpet here! */
  80.